/*
 * Copyright © 2017 eqxiu.com 北京中网易企秀科技有限公司  All rights reserved.
 */
package cn.hermit.data.xml.model;

/**
 * Java model of XML CATA.
 * 
 * @author Jack Gao (Chinese name : GAO JIANGUO, Email : linux.gjg@gmail.com)
 * @date 19 Jun, 2014
 */
public final class XmlCData extends XmlText {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2234396907597430261L;

	XmlCData() {
	}

	/**
     * Serialize XML CDATA to XML string.
     */
	public String toString() {
		StringBuilder b = new StringBuilder();
		b.append("<![CDATA[");
		b.append(super.toString());
		b.append("]]>");
		return b.toString();
	}
	
	@Override
	public boolean isCdata() {
		return true;
	}
	
	@Override
	public boolean isPureText() {
		return false;
	}

}